package com.lzm.ydpt.mvp.contract;

import com.byt.framlib.basemvp.BaseView;
import com.byt.framlib.basemvp.basebean.BaseResponseBean;
import com.byt.framlib.basemvp.boby.FormBodys;
import com.google.gson.JsonArray;
import com.lzm.ydpt.entity.mall.GoodsOption;
import com.lzm.ydpt.entity.mall.ProductBean;

import io.reactivex.Observable;

/**
 * 接口名称：XhXnProductDetailsContract
 * 接口描述：Contract
 */
public interface ProductDetailsContract {

    /**
     * 模型接口
     */
    interface Model {
        Observable<BaseResponseBean<ProductBean>> onProductDetails(FormBodys formBodys);

        Observable<BaseResponseBean<ProductBean>> onCollectionProduct(FormBodys formBodys);

        Observable<BaseResponseBean<JsonArray>> onAddCartProduct(FormBodys formBodys);

        Observable<BaseResponseBean<GoodsOption>> onProductOption(FormBodys formBodys);
    }

    /**
     * 代理接口
     */
    interface Presenter {
        void onProductDetails(FormBodys formBodys);

        void onCollectionProduct(FormBodys formBodys);

        void onAddCartProduct(FormBodys formBodys);

        void onProductOption(FormBodys formBodys);
    }

    /**
     * 视图接口
     */
    interface View extends BaseView {
        void onProductDetails(ProductBean productBean);

        void onCollectionProduct(String msg, ProductBean productBean);

        void onAddCartProduct(String msg);

        void onProductOption(GoodsOption mGoodsOption);
    }
}